package cn.javasea.websocket.entity;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: Ethan_Fung
 * @Description:
 * @Date: 2019/10/29 14:39
 * @Version: 1.0
 **/
@Data
@Builder
@NoArgsConstructor
public class JsonMessage {

    public JsonMessage(String method, String type, String name, Object data, String msg) {
        this.method = method;
        this.type = type;
        this.name = name;
        this.data = data;
        this.msg = msg;
    }

    private String method;
    /**
     * 消息类型
     */
    private String type;

    /**
     * 传回json的名字(前后端约定)
     */
    private String name;

    /**
     * 传回的Json
     */
    private Object data;

    /**
     * 额外消息
     */
    private String msg;

}
